package com.ruoyi.system.service.assets.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.assets.FzBuildingRoom;
import com.ruoyi.system.mapper.assets.FzBuildingRoomMapper;
import com.ruoyi.system.service.assets.IFzBuildingRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;

/**
 * 房屋信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-02-28
 */
@Service
public class FzBuildingRoomServiceImpl implements IFzBuildingRoomService
{
    @Autowired
    private FzBuildingRoomMapper fzBuildingRoomMapper;

    /**
     * 查询房屋信息
     * 
     * @param roomId 房屋信息ID
     * @return 房屋信息
     */
    @Override
    public FzBuildingRoom selectFzBuildingRoomById(String roomId)
    {
        return fzBuildingRoomMapper.selectFzBuildingRoomById(roomId);
    }

    /**
     * 查询房屋信息列表
     * 
     * @param fzBuildingRoom 房屋信息
     * @return 房屋信息
     */
    @Override
    public List<FzBuildingRoom> selectFzBuildingRoomList(FzBuildingRoom fzBuildingRoom)
    {
        return fzBuildingRoomMapper.selectFzBuildingRoomList(fzBuildingRoom);
    }

    /**
     * 新增房屋信息
     * 
     * @param fzBuildingRoom 房屋信息
     * @return 结果
     */
    @Override
    public int insertFzBuildingRoom(FzBuildingRoom fzBuildingRoom)
    {
        fzBuildingRoom.setCreateTime(DateUtils.getNowDate());
        return fzBuildingRoomMapper.insertFzBuildingRoom(fzBuildingRoom);
    }

    /**
     * 修改房屋信息
     * 
     * @param fzBuildingRoom 房屋信息
     * @return 结果
     */
    @Override
    public int updateFzBuildingRoom(FzBuildingRoom fzBuildingRoom)
    {
        return fzBuildingRoomMapper.updateFzBuildingRoom(fzBuildingRoom);
    }

    /**
     * 删除房屋信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzBuildingRoomByIds(String ids)
    {
        return fzBuildingRoomMapper.deleteFzBuildingRoomByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除房屋信息信息
     * 
     * @param roomId 房屋信息ID
     * @return 结果
     */
    @Override
    public int deleteFzBuildingRoomById(String roomId)
    {
        return fzBuildingRoomMapper.deleteFzBuildingRoomById(roomId);
    }

    @Override
    public List<FzBuildingRoom> selectFzBuildingRoomByIdList(List<String> roomId) {
        return fzBuildingRoomMapper.selectFzBuildingRoomByIdList(roomId);
    }
}
